Skip to content

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Sep 15, 2025

This may be surprising when HTTP cache performance is a concern, so let's give this early heads-up notice.

@carsonbot carsonbot added this to the 6.4 milestone Sep 15, 2025
@carsonbot carsonbot changed the title Add a note that checking for flash messages defeats HTTP cacheability Add a note that checking for flash messages defeats HTTP cacheability Sep 15, 2025
mpdude and others added 2 commits October 15, 2025 08:39
Co-authored-by: Christian Flothmann <[email protected]>
Co-authored-by: Christian Flothmann <[email protected]>
Accessing flash messages means that the session must be started, which
in turn will cause Symfony to mark the responses as ``private``. In general,
since flashes shall displayed only once, pages that might display flashes
cannot reasonably be cached in HTTP caches.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as its a tip block you are adding, what about also write that one can load such statefull flash session message async, via for ex an ux live component completely decoupled from the main response that could be stateless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants